﻿Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Data
Imports System.Data.SqlClient
Imports DoAnQuanLyBanHang1065043_1065007.DoAnQuanLyBanHang.General

Namespace DoAnQuanLyBanHang.DTO
    Public Class LoaiTienData
        Private m_LoaiTienData As New DataService()

        Public Function LayLoaiTien() As DataTable
            Dim cmd As New SqlCommand("SELECT * FROM Loai_Tien")
            m_LoaiTienData.Load(cmd)
            Return m_LoaiTienData
        End Function

        Public Function ThemDongMoi() As DataRow
            Return m_LoaiTienData.NewRow()
        End Function

        Public Sub ThemLoaiTien(m_Row As DataRow)
            m_LoaiTienData.Rows.Add(m_Row)
        End Sub

        Public Function LuuLoaiTien() As Boolean
            Return m_LoaiTienData.ExecuteNoneQuery() > 0
        End Function
    End Class
End Namespace
